Formius.Element_Container_Repeat_Control = $.inherit(Formius.Element_Button, {
	__constructor: function(element, parent) {
		this.__base(element, parent);
		this.settings = this.getForm().getSettings();
	},
	click: function() {
		var method, actions = ['add', 'remove', 'up', 'down'];
		for (var i = actions.length - 1; i >= 0; i--) {
			if (actions[i] in this.settings.selectors.repeat
				&& this.getElement().is(this.settings.selectors.repeat[actions[i]])) {
				method = actions[i];
				break;
			}
		}
		if (method in this.getParent() && this.getParent()[method] instanceof Function) {
			this.getParent()[method]();
		}
		return false;
	}
});